package com.ls.pattern.strategy.pay;


import com.ls.pattern.strategy.pay.payport.BasePayment;
import com.ls.pattern.strategy.pay.payport.PayStrategy;

/**
 * 订单业务处理类
 *
 * @author 挥之以墨
 */
public class OrderBiz {

    public MsgResult pay(Order order) {
        BasePayment payment = PayStrategy.getPayStrategy(order.getPayKey());
        System.out.println("欢迎使用：" + payment.getName());
        System.out.println("本次支付金额为：" + order.getAmount());
        return payment.pay(order);
    }

}
